.bin-tabs-wrapper {
  position: relative;

  .nav-wrap {
    position: relative;
    z-index: 2;

    &.is-scrollable {
      padding: 0 20px;
      box-sizing: border-box;

      .nav-next,
      .nav-prev {
        position: absolute;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        line-height: 36px;
        width: 20px;
        font-size: var(--bin-font-size-default);
        color: var(--bin-color-text-default);
        z-index: 1;

        i {
          font-size: 14px;
        }

        &.disabled {
          opacity: 1;
          cursor: not-allowed;
          color: var(--bin-color-text-placeholder);
        }
      }

      .nav-prev {
        left: 0;
      }

      .nav-next {
        right: 0;
        text-align: right;
      }
    }
  }

  .scroll-container {
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;

    .scroll-wrapper {
      position: absolute;
      transition: var(--bin-animation-duration-base);
    }
  }

  .nav-wrapper {
    height: 36px;

    .tab-item {
      display: inline-flex;
      align-items: center;
      position: relative;
      cursor: pointer;
      color: var(--bin-color-text-default);
      height: 36px;
      line-height: 36px;
      padding: 0 18px;
      font-size: var(--bin-font-size-default);
      transition: var(--bin-animation-duration-base);

      .b-iconfont:not(.b-icon-close) {
        position: relative;
        top: -1px;
        font-size: 16px;
        height: 16px;
        line-height: 16px;
        margin-right: 6px;
        color: var(--bin-color-text-default);
        transition: var(--bin-animation-duration-base);
      }

      .b-icon-close {
        position: relative;
        right: -5px;
        width: 0;
        overflow: hidden;
        font-size: 12px;
        text-align: center;
        height: 14px;
        line-height: 15px;
        color: var(--bin-color-text-default);
        transition: var(--bin-animation-duration-base);

        &:hover {
          color: var(--bin-color-text-primary);
        }
      }

      &:hover {
        color: var(--bin-color-primary);

        > i:not(.b-icon-close) {
          color: var(--bin-color-primary);
        }

        .b-icon-close {
          width: 16px;
          margin-left: 2px;
        }
      }

      &.active {
        color: var(--bin-color-primary);

        > i:not(.b-icon-close) {
          color: var(--bin-color-primary);
        }

        .b-icon-close {
          width: 16px;
          margin-left: 4px;
        }
      }
    }

    .tabs-active-bar {
      position: absolute;
      bottom: 0;
      left: 0;
      height: 2px;
      background-color: var(--bin-color-primary);
      z-index: 10;
      transition: transform var(--bin-animation-duration-base) cubic-bezier(0.645, 0.045, 0.355, 1);
      list-style: none;
    }
  }

  .contextmenu {
    margin: 0;
    background: #fff;
    z-index: 9999;
    position: fixed;
    left: 0;
    top: 0;
    list-style-type: none;
    padding: 4px 0;
    border-radius: var(--bin-border-radius-default);
    font-size: var(--bin-font-size-default);
    color: var(--bin-color-text-default);
    border: 1px solid var(--bin-border-color-light);
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);

    li {
      margin: 0;
      padding: 8px 16px;
      cursor: pointer;
      line-height: 1em;
      list-style: none;
      color: var(--bin-color-text-default);

      &:hover {
        background: var(--bin-color-primary-light5);
        color: var(--bin-color-primary);
      }
    }
  }

  &.default:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: #e4e7ed;
    z-index: 1;
  }

  &.card {
    border-bottom: 1px solid #e4e7ed;

    .nav-wrapper {
      height: 37px;
      z-index: 1;
      bottom: -1px;
    }

    .tab-list {
      border: 1px solid #e4e7ed;
      border-bottom: none;
      border-radius: var(--bin-border-radius-default) var(--bin-border-radius-default) 0 0;
      box-sizing: border-box;
      overflow: hidden;
    }

    .tab-item {
      background: #fff;
      border-bottom: 1px solid #e4e7ed;
      border-left: 1px solid #e4e7ed;
      transition: var(--bin-animation-duration-base);

      &:first-child {
        border-left: none;
      }

      &.active {
        border-bottom-color: #fff;
      }
    }
  }

  &.tag {
    .tab-item {
      background: #fff;
      border-radius: var(--bin-border-radius-default);
      padding: 0 12px;
      border: 1px solid #e8eaec;
      margin-right: 8px;
      font-size: var(--bin-font-size-default);

      &::before {
        content: '';
        background: #e1e1e1;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        margin-right: 4px;
      }

      &.width-icon::before {
        display: none;
      }

      &.active {
        &::before {
          background: var(--bin-color-primary);
        }

        &.no-close {
          padding: 0 12px;
        }

        .custom-icon {
          color: var(--bin-color-primary);
        }
      }
    }
  }
}
